import { Component, OnInit } from '@angular/core';
import { Router, NavigationExtras } from '@angular/router';
import {HttpClient,HttpHeaders} from "@angular/common/http";
import {TranslateService} from '@ngx-translate/core';
import { DefaultLanguageService } from '@services/default-language.service';
import { Platform,NavController  } from '@ionic/angular';
@Component({
  selector: 'app-free-payment',
  templateUrl: './free-payment.page.html',
  styleUrls: ['./free-payment.page.scss'],
})
export class FreePaymentPage implements OnInit {

  consentAgreement=true;
  constructor(
    private http:HttpClient,
    private router:Router,
    private translate: TranslateService,
    public navController: NavController,
    private defaultLanguageService:DefaultLanguageService
  ) {
    let defultLanguage = this.defaultLanguageService.getDefaultLanguage();
    this.translate.setDefaultLang(defultLanguage);
    this.translate.use(defultLanguage);
  }

  ngOnInit() {
  }

  changeConsentAgreement(){
    this.consentAgreement = !this.consentAgreement;
  }

  toSelectAmt(){
    this.router.navigate(['/tabs/myAccount/setting/payment-settings/free-payment/selected-amount']);
  }

  
  routerBack(){
    this.navController.back();
  }
}
